1 HOK comparison of CASAL and Casal2 model configurations

This document compares the results of at least 2 CASAL model configurations (base and at least one sensitivity) and up to 8 Casal2 model configurations (3 BetaDiff, 2 CppAD, and 3 ADOL-C).

The CASAL model sensitivity 1 has a smaller minimisation tolerance value than the CASAL base model (1e-9 vs. 1e-6).

The Casal2 ADOL-C and BetaDiff low tolerance models have a smaller tolerance value than the CASAL base model (1e-9 vs. 1e-6). The Casal2 CppAD models have a tolerance value of 1e-9.

1.1 HOK model characteristics

The main characteristics of the Test Case HOK (hoki) CASAL model are:

  • one stock, ages 1 - 17
  • one area, although many characteristics are separated into "east" and "west"
  • years 1972 - 2018, projection years 2019 - 2023
  • five time steps: Oct_Nov, Dec_Mar, Apr_Jun, End_Jun, and Jul_Sep
  • five stock categories: west.sa, east.cr, west.cr, west.wc, and east.cs (labeled "stock.area")
  • five migration processes, which have age-specific proportions specified
  • sex-specific natural mortality-at-age is double exponential
  • area-specific von Bertalanffy age-length relationship
  • area-specific length-weight relationship (\(W = aL^b\))
  • area-specific Beverton-Holt stock-recruitment relationships, with steepness (h) 0.75
  • ageing error is specified
  • surveys with double normal selectivity
  • six area-specific fisheries with double normal selectivity

Observation data include:

  • survey indices
  • survey proportions-at-age
  • fishery proportions-at-age

Parameters estimated include:

  • area-specific B0
  • parameters for the natural mortality-at-age ogive
  • catchability (q) for the surveys
  • parameters for the selectivity curves for the surveys
  • parameters for the selectivity curves for the fisheries
  • migration proportions by age
  • area-specific YCS (recruitment deviations)

1.2 HOK model MCMC specifications

The CASAL MCMC options include

  • start 1
  • keep 1000
  • length 4000000
  • stepsize 0.02
  • adaptive_stepsize 1
  • adapt_at 20000 40000 60000 80000 100000
  • burn_in 500
  • subsample_size 2000
  • systematic 1

The Casal2 ADOL-C and BetaDiff MCMC options include

  • start 0.3
  • keep 1000
  • length 4000000
  • step_size 0.02
  • adapt_stepsize_at 20000 40000 60000 80000 100000
  • proposal_distribution t
  • adapt_stepsize_method double_half
  • max_correlation 0.9

The Casal2 CppAD MCMC runs use the BetaDiff covariance matrices since Casal2 does not output the covariance matrix from CppAD minimisation. The Casal2 CppAD MCMC options include

  • start 0.3
  • keep 1000
  • length 5000000 (originally 4M)
  • step_size 0.02
  • adapt_stepsize_at 20000 40000 60000 80000 100000
  • proposal_distribution t
  • adapt_stepsize_method double_half
  • max_correlation 0.9
  • adapt_covariance_matrix_at 1000000

1.3 R environment

## [1] "Fri Jul 31 12:36:21 2020"
## R version 3.6.0 (2019-04-26)
## Platform: x86_64-redhat-linux-gnu (64-bit)
## Running under: CentOS Linux 7 (Core)
## 
## Matrix products: default
## BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
## 
## locale:
##  [1] LC_CTYPE=en_NZ.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_NZ.UTF-8        LC_COLLATE=en_NZ.UTF-8    
##  [5] LC_MONETARY=en_NZ.UTF-8    LC_MESSAGES=en_NZ.UTF-8   
##  [7] LC_PAPER=en_GB.UTF_8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_NZ.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] casal2_1.0     casal_2.30     devtools_2.3.1 usethis_1.6.1  ggthemes_4.2.0
##  [6] gridExtra_2.3  coda_0.19-3    ggmcmc_1.4.1   ggplot2_3.3.2  tidyr_1.1.0   
## [11] dplyr_0.8.5   
## 
## loaded via a namespace (and not attached):
##  [1] tidyselect_1.1.0   xfun_0.16          remotes_2.2.0      purrr_0.3.4       
##  [5] lattice_0.20-38    colorspace_1.4-1   vctrs_0.3.2        testthat_2.3.2    
##  [9] htmltools_0.5.0    yaml_2.2.1         rlang_0.4.7        pkgbuild_1.1.0    
## [13] pillar_1.4.6       glue_1.4.1         withr_2.2.0        RColorBrewer_1.1-2
## [17] sessioninfo_1.1.1  lifecycle_0.2.0    plyr_1.8.6         stringr_1.4.0     
## [21] munsell_0.5.0      gtable_0.3.0       evaluate_0.14      memoise_1.1.0     
## [25] knitr_1.29         GGally_1.4.0       callr_3.4.3        ps_1.3.3          
## [29] fansi_0.4.1        Rcpp_1.0.5         scales_1.1.1       backports_1.1.8   
## [33] desc_1.2.0         pkgload_1.1.0      fs_1.4.2           digest_0.6.25     
## [37] stringi_1.4.6      processx_3.4.3     grid_3.6.0         rprojroot_1.3-2   
## [41] cli_2.0.2          tools_3.6.0        magrittr_1.5       tibble_3.0.3      
## [45] crayon_1.3.4       pkgconfig_2.0.3    ellipsis_0.3.1     prettyunits_1.1.1 
## [49] assertthat_0.2.1   rmarkdown_2.3      reshape_0.8.8      R6_2.4.1          
## [53] compiler_3.6.0

1.4 CASAL and Casal2 model output

# source('../../R-functions/report_read_in_CASAL_MPD_files.R')
source('../../R-functions/report_read_in_CASAL_MCMC_files.R')
source('../../R-functions/report_read_in_Casal2_MPD_files.R')
source('../../R-functions/report_read_in_Casal2_MCMC_files.R')

1.5 MCMC diagnostics

1.5.1 Diagnostics for the CASAL and Casal2 model MCMC results

For the diagnostics below, the last 3000 samples for each chain are used and subsampled at 3, so that 1000 samples are input into the diagnostic functions.